
package za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Flyweight.Model;

import za.ac.cput.peterjohn.DesignPatternPrincipals.Structural.Flyweight.Model.Flyweight;


public class FlyweightAdder implements Flyweight
{

    String operation;
    
    public FlyweightAdder() 
    {
        operation = "adding";
        try {  Thread.sleep(3000); }
        catch (InterruptedException e) { e.printStackTrace(); }
    }

    @Override
    public String doMath(int a, int b) { return operation + " = " + a + " + " + b + " = " + (a+b); }
  
}